package org.dfg.corejava.jdk8.time;

import java.time.Clock;
import java.time.LocalDateTime;
import java.time.ZoneId;

public class LocalTimeTest {

    public static void main(String[] args) {
        LocalDateTime t1 = LocalDateTime.now();
        System.out.println(t1);
        System.out.println(t1.atZone(ZoneId.of("Europe/Paris")));//不准

        LocalDateTime now2 = LocalDateTime.now(ZoneId.of("Europe/Paris"));   //自定义时区  
        System.out.println(now2);//相应的时区显示日期  

        System.out.println(Clock.systemDefaultZone().getZone());
    }
}
